<div id="body">
	<?php $this->widget('UserPanel'); ?>
	<div class="col-span-8 col-right-holder pull-right">
		<div class="panel">
			<div class="panel-heading">Thay đổi mật khẩu</div>
			<div class="panel-content">
				<div class="form">

					<?php $form = $this->beginWidget('CActiveForm', array(
						'id'                   => 'user-form',
						'enableAjaxValidation' => true,
					)); ?>

					<?php echo $form->errorSummary($model, 'Có lỗi xảy ra:'); ?>

					<div class="row">
						<?php echo $form->labelEx($model, 'oldPassword'); ?>
						<?php echo $form->passwordField($model, 'oldPassword', array('size'      => 60,
						                                                             'maxlength' => 255
							)); ?>
						<?php echo $form->error($model, 'oldPassword', array('style' => 'margin-left:205px;color:red;')); ?>
					</div>

					<div class="row">
						<?php echo $form->labelEx($model, 'newPassword'); ?>
						<?php echo $form->passwordField($model, 'newPassword', array('size'      => 60,
						                                                             'maxlength' => 255
							)); ?>
						<?php echo $form->error($model, 'newPassword', array('style' => 'margin-left:205px;color:red;')); ?>
					</div>

					<div class="row">
						<?php echo $form->labelEx($model, 'confirmPassword'); ?>
						<?php echo $form->passwordField($model, 'confirmPassword', array('size'      => 60,
						                                                                 'maxlength' => 255
							)); ?>
						<?php echo $form->error($model, 'confirmPassword', array('style' => 'margin-left:205px;color:red;')); ?>
					</div>

					<div class="row">
						<?php echo CHtml::submitButton($model->isNewRecord ? 'Create' : 'Thay đổi', array('class' => 'btn-save')); ?>
					</div>

					<?php $this->endWidget(); ?>

				</div>
				<!-- form -->
			</div>
		</div>
	</div>
</div>
<?php
if(Yii::app()->user->hasFlash('success')) {
	echo '<script>alert(\'' . Yii::app()->user->getFlash('success') . '\');</script>';
}
?>
